import Main from "../pages/Main.vue";
import {createRouter, createWebHistory} from "vue-router";
import Login from "../pages/Login.vue";
import Register from "../pages/Register.vue";
import Panic from "../pages/Panic.vue";
import Space from "../pages/Space.vue";
import Test from "../pages/Test.vue";

const routes = [
    {
        path: '/',
        component: Main,
        meta: {
            requireAuth: false
        }
    },
    {
        path: '/space',
        component: Space,
        meta: {
            requireAuth: true
        }
    },
    {
        path: "/login",
        component: Login,
        meta: {
            requireAuth: false
        }
    },
    {
        path: "/register",
        component: Register,
        meta: {
            requireAuth: false
        }
    },
    {
        path: "/panic",
        component: Panic,
        meta: {
            requireAuth: false
        }
    },
    {
        path: "/test",
        component: Test
    }

]

const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router